package com.itheima.mall.dubbo.api.ums;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.mall.commons.page.PageResult;
import com.itheima.mall.entity.domain.dto.RoleWithMenuDto;
import com.itheima.mall.entity.domain.dto.RoleWithResourceDto;
import com.itheima.mall.entity.domain.ums.Menu;
import com.itheima.mall.entity.domain.ums.Resource;
import com.itheima.mall.entity.domain.ums.Role;

import java.util.List;

/**
 * <p>
 * 后台用户角色表 服务类
 * </p>
 *
 * @author qinglang
 * @since 2022-07-05
 */
public interface RoleService extends IService<Role> {

    void allocMenu(RoleWithMenuDto roleWithMenuDto);

    void allocResource(RoleWithResourceDto roleWithResourceDto);

    void create(Role role);

    void delete(List<Integer> ids);

    PageResult listR(String keyword, Integer pageNum, Integer pageSize);

    List<Role> listAll();

    List<Menu> listMenu(Integer roleId);

    List<Resource> listResource(Integer roleId);

    void updateR(Role role);

    void updateStatus(Integer id, Integer status);
}
